package ruifeng.zcj.dig.ui.vehicle;

import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.OnClick;
import ruifeng.zcj.dig.R;
import ruifeng.zcj.dig.base.FragmentInfo;
import ruifeng.zcj.dig.ui.base.DepositFragment;
import ruifeng.zcj.dig.ui.home.change.ChangeMainFragment;

/**
 * 二手车
 * Created by Administrator on 2016/8/31 0031.
 */
public class VehicleFragment extends DepositFragment {


    @Bind(R.id.activity_top_center)
    TextView mActivityTopCenter;
    @Bind(R.id.activity_top_left)
    ImageView mActivityTopLeft;
    @Bind(R.id.activity_top_right_text)
    TextView mActivityTopRightText;
    @Bind(R.id.iv_pic)
    ImageView mIvPic;
    @Bind(R.id.home_fragment_img3)
    ImageView mHomeFragmentImg3;
    @Bind(R.id.home_fragment_text3)
    TextView mHomeFragmentText3;
    @Bind(R.id.vehicle_fragment_relative1)
    RelativeLayout mVehicleFragmentRelative1;
    @Bind(R.id.home_fragment_img4)
    ImageView mHomeFragmentImg4;
    @Bind(R.id.home_fragment_text4)
    TextView mHomeFragmentText4;
    @Bind(R.id.vehicle_fragment_relative2)
    RelativeLayout mVehicleFragmentRelative2;
    @Bind(R.id.color_name)
    TextView mColorName;
    @Bind(R.id.color)
    View mColor;


    @Override
    protected void initFragmentConfig(View view) {
        mActivityTopCenter.setText("二手车");
        mActivityTopLeft.setVisibility(View.INVISIBLE);
        /*mActivityTopRight.setImageResource(R.drawable.personal_h);*/
        mColorName.setText("最新设备");
        mIvPic.setImageResource(R.drawable.banner_vehicle);
        mColor.setBackgroundResource(R.drawable.yellow_h);

        mHomeFragmentImg3.setImageResource(R.drawable.buycar_h);
        mHomeFragmentText3.setText("买车");
        mHomeFragmentImg4.setImageResource(R.drawable.sell_h);
        mHomeFragmentText4.setText("卖车");
        super.initFragmentConfig(view);
    }

    /***
     * 设置缓存页数
     ***/
    public void setScreenPageLimit() {
        mViewPager.setOffscreenPageLimit(mBaseFragmentViewPageAdapter.getCount());
    }

    @Override
    protected void addPage(ArrayList<String> tabTitles, ArrayList<FragmentInfo> fragmentInfos) {
        tabTitles.add("测试下哈");
        fragmentInfos.add(new FragmentInfo(NewVehicleFragment.class, getBundle(1)));
    }

    @Override
    protected int getContentView() {
        return R.layout.fragment_vehicle;
    }

    @Override
    protected void onFirstUserVisible() {

    }

    @Override
    protected void onUserVisible() {

    }

    @Override
    protected void onUserInvisible() {

    }

    @Override
    protected void cleanMemory() {

    }





    @OnClick({R.id.activity_top_right, R.id.iv_pic, R.id.vehicle_fragment_relative1, R.id.vehicle_fragment_relative2})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.activity_top_right:

                break;
            case R.id.iv_pic:
                break;
            case R.id.vehicle_fragment_relative1:
                break;
            case R.id.vehicle_fragment_relative2:
                break;
        }
    }
}
